'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  // router
  // eslint-disable-next-line no-unused-vars
  const { router, controller } = app;
  // app.router.resources('topics', '/api/v2/topics', app.controller.topics);
  const api = '/api/v2';
  app.router.get(`${api}/user/login`, app.controller.user.login);
  app.router.get(`${api}/user/index`, app.controller.user.index);
  app.router.get(`${api}/user/detail`, app.controller.user.detail);
  app.router.get(`${api}/user/del`, app.controller.user.del);
  app.router.post(`${api}/user/create`, app.controller.user.create);
  app.router.post(`${api}/user/update`, app.controller.user.update);

};
